

<%@ page import="com.gasstation.GasPurchases" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'gasPurchases.label', default: 'GasPurchases')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
            <span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${gasPurchasesInstance}">
            <div class="errors">
                <g:renderErrors bean="${gasPurchasesInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${gasPurchasesInstance?.id}" />
                <g:hiddenField name="version" value="${gasPurchasesInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                         	<tr class="prop">
                                <td valign="top" class="name">
                                    <label for="transactionOn"><g:message code="gasPurchases.transactionOn.label" default="Transaction On" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'transactionOn', 'errors')}">
                                    <g:datePicker name="transactionOn" precision="day" value="${gasPurchasesInstance?.transactionOn}"  />
                                </td>
                                <td></td>
                            </tr>
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="regular"><g:message code="gasPurchases.regular.label" default="Regular Gas" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'regularNetGallons', 'errors')}">
                                     Gal <g:textField name="regularNetGallons" value="${gasPurchasesInstance?.regularNetGallons}"/>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'regularPricePerGallon', 'errors')}">
                                	Price/Gal $<g:textField name="regularPricePerGallon" value="${gasPurchasesInstance?.regularPricePerGallon}"/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="midGrade"><g:message code="gasPurchases.midGrade.label" default="Mid Grade Gas" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'midGradeNetGallons', 'errors')}">
                                	Gal <g:textField name="midGradeNetGallons" value="${gasPurchasesInstance?.midGradeNetGallons}"/>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'midGradePricePerGallon', 'errors')}">
                                	Price/Gal $<g:textField name="midGradePricePerGallon" value="${gasPurchasesInstance?.midGradePricePerGallon}"/>
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="premium"><g:message code="gasPurchases.premium.label" default="Premium Gas" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'premiumNetGallons', 'errors')}">
                                    Gal <g:textField name="premiumNetGallons" value="${gasPurchasesInstance?.premiumNetGallons}"/>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: gasPurchasesInstance, field: 'premiumPricePerGallon', 'errors')}">
                                	Price/Gal $<g:textField name="premiumPricePerGallon" value="${gasPurchasesInstance?.premiumPricePerGallon}"/>
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="Update" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
